1 /* ====================================================================
2 * Bigyo Software License, version 1.1
3 *
4 * Copyright (c) 2004, Zsombor Gegesy. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 *
17 * 3. Neither the name of the Bigyo Group nor the name "Bigyo" nor
18 * the names of its contributors may be used to endorse or promote
19 * products derived from this software without specific prior
20 * written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 *
35 * ====================================================================
36 */
37
38 package net.sf.bigyo.model;
39
40 import java.util.ArrayList;
41 import java.util.List;
42
43 /***
44 * Egy komponens leirasa, tartalmazza a nevet, hogy milyen profile-ban szerepel -
45 * lehet null -, s hogy milyen objektumoktol fugg.
46 *
47 * Created on 2004.03.31.
48 * @author zsombor
49 *
50 */
51 public class ComponentConfig {
52
53 String classAlias;
54 String instanceName;
55
56 String lifeCycle;
57
58 List neededObjects;
59
60 Object configBean;
61
62 String profile; // null, ha mindig aktivalodik, egyebkent csak az adott
63 // profile eseteben
64
65 /***
66 *
67 */
68 public ComponentConfig() {
69 super();
70 }
71
72 /***
73 * @return Returns the configBean.
74 */
75 public Object getConfigBean() {
76 return configBean;
77 }
78
79 /***
80 * @param configBean
81 * The configBean to set.
82 */
83 public void setConfigBean(Object configBean) {
84 this.configBean = configBean;
85 }
86
87 /***
88 * @return Returns the neededObjects.
89 */
90 public List getNeededObjects() {
91 return neededObjects;
92 }
93
94 /***
95 * @param neededObjects
96 * The neededObjects to set.
97 */
98 public void setNeededObjects(List neededObjects) {
99 this.neededObjects = neededObjects;
100 }
101
102 /***
103 * @return Returns the classAlias.
104 */
105 public String getClassAlias() {
106 return classAlias;
107 }
108
109 /***
110 * @param classAlias
111 * The classAlias to set.
112 */
113 public void setClassAlias(String classAlias) {
114 this.classAlias = classAlias;
115 }
116
117 /***
118 * @return Returns the instanceName.
119 */
120 public String getInstanceName() {
121 return instanceName;
122 }
123
124 /***
125 * @param instanceName
126 * The instanceName to set.
127 */
128 public void setInstanceName(String instanceName) {
129 this.instanceName = instanceName;
130 }
131
132 public void addDependency(ObjectDependency d) {
133 if (neededObjects == null)
134 neededObjects = new ArrayList();
135 neededObjects.add(d);
136 }
137
138 /***
139 * @return Returns the lifeCycle.
140 */
141 public String getLifeCycle() {
142 return lifeCycle;
143 }
144
145 /***
146 * @param lifeCycle
147 * The lifeCycle to set.
148 */
149 public void setLifeCycle(String lifeCycle) {
150 this.lifeCycle = lifeCycle;
151 }
152
153 /***
154 * @return Returns the profile.
155 */
156 public final String getProfile() {
157 return profile;
158 }
159
160 /***
161 * @param profile
162 * The profile to set.
163 */
164 public final void setProfile(String profile) {
165 this.profile = profile;
166 }
167
168 public boolean isStartupComponent() {
169 return "startup".equals(getLifeCycle());
170 }
171
172 }
This page was automatically generated by Maven